package com.rlyy.basic.process;

import com.rlyy.common.param.Request;
import com.rlyy.common.response.Result;
import com.rlyy.common.response.ResultUtil;
import org.springframework.stereotype.Component;

/**
 * 处理异步请求
 *
 * @author yuanqinglong
 * @since 2021/9/14 11:34
 */
@Component
public class AsyncProcessor implements ISyncAsyncProcessor {

    /**
     * 异步
     *
     * @return boolean
     */
    @Override
    public boolean asyncProcess() {
        return true;
    }


    /**
     * 异步处理
     *
     * @param request 完整的请求
     * @return 结果
     */
    @Override
    public Result doProcess(Request request) {
        // 保存异步请求信息
        return ResultUtil.success();
    }
}
